package cate.game.play.buff.h;

import cate.game.play.buff.BuffHandler;
import cate.game.play.config.PlayCfgArgs;
import cate.game.play.proce.action.ctx.SkillActionCtx;

/**
 * 触发闪避时添加buff
 */
public class 闪避添加buffBH extends BuffHandler {

	private int addBuff;

	//buff=123
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		addBuff = args.getInt("buff", 0);
	}

	@Override
	public void onMissAsTarget(SkillActionCtx action) {
		buff.owner.buff.tryAddByTid(action, addBuff);
	}
}
